chapter three, we'll look at the benefits of this design when we discuss Git branch management.Nearly all operations are performed locallyThe vast majority of operations in Git require access to local files and resources without a network connection. But if you use CVCS, almost all operations need to be connected to the network. Because Git keeps a historical up
tar xjv -C /usr/local/share/man -f git-manpages-1.7.2.1.tar.bz2You can also copy and execute the following script to easily fix the manual installation:cd /tmpcurl -O "http://kernel.org/pub/software/scm/git/git-manpages-`git --version | awk ‘{print $3}‘`.tar.bz2"sudo mkdir -p /usr/local/share/mansudo tar xjv -C /usr/l
notes and other information, very comprehensiveFirst come here, unconsciously 4 o'clock in the morning, about the use of tortoisegit will make you constantly pleasantly surprised, the next chapter will continue to introduce the establishment of branches, flexible switching between branches, merging and so very useful functions.8. Highlights of this section:The content of this section is more, first let us to git this version of the control system has
–pretty=oneline demo is as follows:Now I want to use the version fallback operation, I want to fallback the current version to the previous version, what command to use? You can use the following 2 kinds of commands, the first is: Git reset–hard head^ Then if you want to fall back to the first version just change head^ to head^^ and so on. If you want to fall back to the first 100 versions, using the above method is certainly inconvenient, we can use
? We can go back with the version number and use the command method as follows:Git reset--hard version number, but now if I've turned off the command line or the version number of the 333 content, I don't know. How do you know the version number that adds 3333 content? The version number can be obtained from the following command: The Git reflog demo is as follows:As we can see from the above display, the v
When we need to delete 暂存区 or 分支 on the file, and the workspace also does not need this file, you can useWhen we need to delete 暂存区 or 分支 file on, but local need to use, just do not want this file to be version controlled, can usegit rm --cached file_path
File_path to file path
Yin FengLinks: Https://www.jianshu.com/p/337aeafc2f40Source: PinterestCopyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the sour
staging area, including subdirectories $ git add[dir]# Add all files of the current directory to staging area $ git add . # Delete the workspace file and put this deletion into staging area $ git rm [file1] [file2] . . # Stop tracking the specified file, but the file will remain in the workspace $ git rm --cached [Fi
]:[BRANCH_NAME_REMOTE] $ git pullExample:$ git remote add binRepo https://coding.net/chenbin/GitTest2.git $ git push binbin binRepo:master //由于是第一次推送,该操作已经使得分支binbin 跟踪了远程分支 binRepo/mastrWhen a branch a tracks remote Branch B, that is, B becomes the default pull source for a, and therefor
default behaviour, setRemote:error: ' receive.denycurrentbranch ' configuration variable to ' refuse '.to [email protected]:/opt/git/project.git/! [Remote rejected] master, master (branch is currently checked out)Error:failed to push some refs to ' [email protected]:/opt/git/project.git/'A:$cd. Git$vim ConfigThe original contents of the configuration file are:[C
content? We can go back with the version number and use the command method as follows:Git reset--hard version number, but now if I've turned off the command line or the version number of the 333 content, I don't know. How do you know the version number that adds 3333 content? The version number can be obtained from the following command: The Git reflog demo is as follows:As we can see from the above displa
* .exe my_db_config / !main.pyc
Open source China Anonymous member translated 2 years ago 0 Human top top Good translation!
other translations (1)
3. Who messed up my code? When things go wrong, it is one of human nature to accuse others first. If your product server hangs up, using the git blame command can easily
the commandlineGit Extensions is a graphical client of git that controls the Git repository and supports Windows Explorer integration and Visual Studio integration. (Excerpt from Oschina)Support System: Windows/linux (Freeware)X. Giteye-your eye on all things GitGiteye is a simple and easy-to-use Git clientLandlord in Linux under the trial of this software, feel
world, merging/branching has always been considered a bit scary ("Beware of merge conflicts, it will bite you!"), and things that are seldom used (it may be used once every once in a while).But for git, these operations are very inexpensive and simple, and they are considered daily work?? One of the core operations in the process, which is really the case. For example, in CVS/SVN's books, branching and merging are discussed in later chapters (for adv
mentioned this earlier, the emphasis is not sufficient. If you want to use all of the features of Git,You should definitely switch to the command line interface!2. Ignore files in GitAre you annoying those compiled files (for example) that .pyc appear in your Git repository? Or have you had enough of that already added to the Git repository? Well, there's a way
:/etc/gitconfig and ~/.gitconfig). In this case, Git uses the last value for each unique keyword.You can also look at the current value of a particular keyword that git believes to be, using the following command git config {key}:$ git config user.nameScott Chacon2.5 Get Assistance (Getting help)If you need help with
use of strong coverage in your local code to replace the contents of the Git repositoryGit push-f2, first fetch git things to your local and then merge and then push$ git fetch$ git mergeThe 2-sentence command is equivalent to
$ git pull
However, the following
git needs are stored in this directory.If there are several files in the current directory that you want to include in version control, you need to first tell Git to start tracking the files with the git add command and then commit:*. -' Initialize project version ' The above command submits the directory under the. C End and the README file to the repository.
a version control system is in the package Git-core.?
12
$sudoaptitudeinstallgit-core$sudo aptitudeinstallgit-docgit-svngit-emailgit-guigitk
--rhel,fedora,centos:?
12
$yuminstallgit$yuminstallgit-docgit-svngit-emailgit-guigitk
The process of installing git in other distributions is similar to the method described above. The
directory (record version history) and a copy of the actual project file. You can call this repository "working directory." The working directory is a directory containing the version history directory ". Git" and the source file. You can modify your source files in the working directory and use the "Git add" and "git Commit" commands for version management.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.